home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2004 April
/
Gamestar_61_2004-04_dvdb.iso
/
DVDStar
/
Editace
/
hltp.exe
/
{app}
/
Source Code
/
CZBindMaker
/
PrivateSettings
/
SettingCollection.cs
< prev
next >
Wrap
Text File
|
2003-10-10
|
3KB
|
94 lines
/*****************************************************************************
Copyright ⌐ 2003 by Martin Cook. All rights are reserved. If you like this
code then feel free to go ahead and use it. The only thing I ask is that
you don't remove or alter my copyright notice. Your use of this software
is entirely at your own risk. I make no claims or warrantees about the
reliability or fitness of this code for any particular purpose. If you
make changes or additions to this code please mark your code as being
yours. If you have questions or comments then please contact me at:
martinc@outdrs.net
Have Fun! :o)
*****************************************************************************/
using System;
using System.Collections;
namespace PrivateSettings
{
/// <summary>
/// A collection of Setting objects.
/// </summary>
public class SettingCollection : CollectionBase
{
// *******************************************************************
// Constructors.
// *******************************************************************
public SettingCollection()
{
} // End SettingCollection()
// *******************************************************************
// Public methods.
// *******************************************************************
public Setting this[int index]
{
get {return List[index] as Setting;}
set {List[index] = value;}
} // End indexer
// *******************************************************************
public int this[Setting item]
{
get {return List.IndexOf(item);}
} // End indexer
// *******************************************************************
public int Add(Setting item)
{
return List.Add(item);
} // End Add()
// *******************************************************************
public void AddRange(Setting[] items)
{
lock(List.SyncRoot)
{
for (int i = 0; i < items.Length; i++)
List.Add(items[i]);
} // End lock block
} // End AddRange()
// *******************************************************************
public void Remove(Setting item)
{
List.Remove(item);
} // End Remove()
// *******************************************************************
public new void Clear()
{
List.Clear();
} // End Clear()
// *******************************************************************
public int IndexOf(Setting item)
{
return List.IndexOf(item);
} // End IndexOf()
} // End class SettingCollection
} // End namespace PrivateSettings